package IU;
import javax.swing.JFrame;
import javax.swing.JPanel;

import java.awt.BorderLayout;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import java.awt.Component;
import javax.swing.border.LineBorder;





import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.SwingConstants;




public class TelaInicial extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	public TelaInicial() {
		super("Montanha de Chomsky");
		this.setUndecorated(true);
		this.setBounds(100, 100, 800, 600);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLocationRelativeTo(null);
		
		JPanel panel = new JPanel();
		panel.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
		this.getContentPane().add(panel, BorderLayout.CENTER);
		panel.setLayout(new BorderLayout(0, 0));
		
		JPanel panelPrincipal = new JPanel();
		panelPrincipal.setBorder(new LineBorder(new Color(0, 0, 0)));
		panelPrincipal.setBackground(Color.WHITE);
		panel.add(panelPrincipal);
		
		
		JButton botaoSair = new JButton();
		botaoSair.setBounds(751, 11, 37, 38);
		botaoSair.setForeground(Color.WHITE);
		botaoSair.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		panelPrincipal.setLayout(null);
		botaoSair.setIcon(new ImageIcon("./Images/fechar-icon.png"));
		botaoSair.setContentAreaFilled(false);
		botaoSair.setBorderPainted(false);
		botaoSair.setToolTipText("Sair");
		panelPrincipal.add(botaoSair);
		
		JButton botaoMinimizar = new JButton();
		botaoMinimizar.setBounds(710, 11, 42, 38);
		botaoMinimizar.setForeground(Color.WHITE);
		botaoMinimizar.setBorderPainted(false);
		botaoMinimizar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setExtendedState(JFrame.ICONIFIED);
			}
		});
		botaoMinimizar.setContentAreaFilled(false);
		botaoMinimizar.setAlignmentX(Component.CENTER_ALIGNMENT);
		botaoMinimizar.setBackground(Color.WHITE);
		botaoMinimizar.setIcon(new ImageIcon("./Images/minimizar-icon.png"));
		botaoMinimizar.setToolTipText("Minimizar");
		panelPrincipal.add(botaoMinimizar);
		
		JButton botaoAmbiente1 = new JButton("Ambiente 1");
		botaoAmbiente1.setBackground(Color.WHITE);
		botaoAmbiente1.setBounds(200, 217, 160, 117);
		botaoAmbiente1.setIcon(new ImageIcon("C:\\Users\\Lucas Sampaio\\Workspace\\MontanhaDeChomsky\\Images\\afd2.png"));
		botaoAmbiente1.setVerticalTextPosition(SwingConstants.TOP); 
		botaoAmbiente1.setHorizontalTextPosition(SwingConstants.CENTER); 
		botaoAmbiente1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				TelaAmbiente1 tela = new TelaAmbiente1();
				tela.setVisible(true);
				setVisible(false);
				
			}
		});
		botaoAmbiente1.setFont(new Font("Tahoma", Font.PLAIN, 21));
		panelPrincipal.add(botaoAmbiente1);
		
		JButton botaoAmbiente2 = new JButton("Ambiente 2");
		botaoAmbiente2.setBackground(Color.WHITE);
		botaoAmbiente2.setIcon(new ImageIcon("C:\\Users\\Lucas Sampaio\\Workspace\\MontanhaDeChomsky\\Images\\adn.png"));
		botaoAmbiente2.setVerticalTextPosition(SwingConstants.TOP); 
		botaoAmbiente2.setHorizontalTextPosition(SwingConstants.CENTER); 
		botaoAmbiente2.setBounds(420, 217, 160, 117);
		botaoAmbiente2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				TelaAmbiente2 tela = new TelaAmbiente2();
				tela.setVisible(true);
				setVisible(false);
			}
		});
		botaoAmbiente2.setFont(new Font("Tahoma", Font.PLAIN, 21));
		panelPrincipal.add(botaoAmbiente2);
		
		JButton botaoAmbiente3 = new JButton("Ambiente 3");
		botaoAmbiente3.setBackground(Color.WHITE);
		botaoAmbiente3.setBounds(200, 380, 160, 117);
		botaoAmbiente3.setFont(new Font("Tahoma", Font.PLAIN, 21));
		panelPrincipal.add(botaoAmbiente3);
		
		JButton botaoAmbiente4 = new JButton("Ambiente 4");
		botaoAmbiente4.setBackground(Color.WHITE);
		botaoAmbiente4.setBounds(420, 380, 160, 117);
		botaoAmbiente4.setFont(new Font("Tahoma", Font.PLAIN, 21));
		panelPrincipal.add(botaoAmbiente4);
		
		JLabel labelTitulo = new JLabel("Montanha de Chomsky");
		labelTitulo.setBounds(118, 88, 598, 62);
		labelTitulo.setFont(new Font("Tahoma", Font.PLAIN, 56));
		panelPrincipal.add(labelTitulo);
		
	}
	
}
